/*     */ package eos.moe.dragoncore;
/*     */ 
/*     */ import com.google.common.collect.ImmutableList;
/*     */ import eos.moe.dragoncore.interfaces.IItemStack;
/*     */ import java.util.HashMap;
/*     */ import java.util.HashSet;
/*     */ import java.util.LinkedHashMap;
/*     */ import java.util.List;
/*     */ import java.util.Map;
/*     */ import java.util.Set;
/*     */ import java.util.concurrent.CopyOnWriteArrayList;
/*     */ import java.util.regex.Pattern;
/*     */ import net.minecraft.client.Minecraft;
/*     */ import net.minecraft.client.renderer.block.model.IBakedModel;
/*     */ import net.minecraft.client.renderer.block.model.ItemOverrideList;
/*     */ import net.minecraft.client.renderer.texture.ITickableTextureObject;
/*     */ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
/*     */ import net.minecraft.client.renderer.texture.TextureMap;
/*     */ import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
/*     */ import net.minecraft.client.resources.IResourceManager;
/*     */ import net.minecraft.item.Item;
/*     */ import net.minecraft.item.ItemStack;
/*     */ import net.minecraft.util.ResourceLocation;
/*     */ import net.minecraftforge.client.model.IModel;
/*     */ import net.minecraftforge.client.model.ItemLayerModel;
/*     */ import net.minecraftforge.client.model.ModelLoaderRegistry;
/*     */ import org.yaml.snakeyamla.configuration.ConfigurationSection;
/*     */ 
/*     */ 
/*     */ 
/*     */ public class ela
/*     */ {
/*  33 */   public static ela s = new ela();
/*     */   
/*  35 */   public static Set<String> m = new HashSet<>();
/*     */   
/*     */   private static boolean l;
/*     */   
/*     */   private IResourceManager t;
/*  40 */   private HashMap<String, IBakedModel> d = new HashMap<>();
/*  41 */   private HashMap<String, IBakedModel> z = new HashMap<>();
/*  42 */   private HashMap<String, xea.eos/moe/dragoncore/ija> i = new HashMap<>();
/*     */   
/*  44 */   private CopyOnWriteArrayList<eos/moe/dragoncore/uba> w = new CopyOnWriteArrayList<>();
/*  45 */   private CopyOnWriteArrayList<eos/moe/dragoncore/vga> q = new CopyOnWriteArrayList<>();
/*  46 */   public long g = Long.MAX_VALUE;
/*     */   
/*     */   public ela() {
/*  49 */     this.t = (IResourceManager)(Minecraft.func_71410_x()).field_110451_am;
/*     */   }
/*     */   
/*     */   public eos/moe/dragoncore/uba v(ItemStack itemStack) {
/*  53 */     if (itemStack.func_190926_b()) return null; 
/*  54 */     if (itemStack.func_77973_b().getRegistryName() != null && itemStack.func_77973_b().getRegistryName().func_110623_a().contains("shulker_box")) {
/*  55 */       return null;
/*     */     }
/*     */     
/*  58 */     String str = ve.v(itemStack, false, false);
/*  59 */     int i = Item.func_150891_b(itemStack.func_77973_b());
/*  60 */     for (eos/moe/dragoncore/uba eos/moe/dragoncore/uba : this.w) {
/*  61 */       if (eos/moe/dragoncore/uba.v(eos/moe/dragoncore/uba) && (eos/moe/dragoncore/uba.v() == 0 || i == eos/moe/dragoncore/uba.v()) && ja.v(eos/moe/dragoncore/uba.v(eos/moe/dragoncore/uba), str)) {
/*  62 */         return eos/moe/dragoncore/uba;
/*     */       }
/*     */     } 
/*  65 */     return null;
/*     */   }
/*     */ 
/*     */   
/*     */   public fj<IBakedModel, String> v(ItemStack itemStack) {
/*  70 */     if (itemStack.func_190926_b()) return null; 
/*  71 */     if (itemStack.func_77973_b().getRegistryName() != null && itemStack.func_77973_b().getRegistryName().func_110623_a().contains("shulker_box")) {
/*  72 */       return null;
/*     */     }
/*     */     
/*  75 */     IItemStack iItemStack = (IItemStack)itemStack;
/*     */     
/*  77 */     long l = ((Long)iItemStack.getMeta("applyModelTime", Long.valueOf(0L))).longValue();
/*  78 */     if (this.g < l) {
/*  79 */       String str1 = (String)iItemStack.getMeta("modelKey");
/*  80 */       if (str1 != null) {
/*  81 */         for (eos/moe/dragoncore/vga eos/moe/dragoncore/vga : this.q) {
/*  82 */           if (eos/moe/dragoncore/vga.h().equals(str1)) {
/*  83 */             return fj.v(v(eos/moe/dragoncore/vga), eos/moe/dragoncore/vga.v());
/*     */           }
/*     */         } 
/*  86 */         for (eos/moe/dragoncore/uba eos/moe/dragoncore/uba : this.w) {
/*  87 */           if (eos/moe/dragoncore/uba.h().equals(str1)) {
/*  88 */             return fj.v(v(eos/moe/dragoncore/uba), eos/moe/dragoncore/uba.v());
/*     */           }
/*     */         } 
/*     */       } 
/*  92 */       return null;
/*     */     } 
/*     */ 
/*     */     
/*  96 */     fj<IBakedModel, String> fj = null;
/*  97 */     String str = ve.v(itemStack, false, false);
/*  98 */     int i = Item.func_150891_b(itemStack.func_77973_b());
/*  99 */     for (eos/moe/dragoncore/vga eos/moe/dragoncore/vga : this.q) {
/* 100 */       if ((eos/moe/dragoncore/vga.v() == 0 || i == eos/moe/dragoncore/vga.v()) && ja.v(eos/moe/dragoncore/vga.v(eos/moe/dragoncore/vga), str)) {
/* 101 */         IBakedModel iBakedModel = v(eos/moe/dragoncore/vga);
/* 102 */         fj = fj.v(iBakedModel, eos/moe/dragoncore/vga.v());
/* 103 */         iItemStack.setMeta("modelKey", eos/moe/dragoncore/vga.h());
/*     */         break;
/*     */       } 
/*     */     } 
/* 107 */     for (eos/moe/dragoncore/uba eos/moe/dragoncore/uba : this.w) {
/* 108 */       if ((eos/moe/dragoncore/uba.v() == 0 || i == eos/moe/dragoncore/uba.v()) && ja.v(eos/moe/dragoncore/uba.v(eos/moe/dragoncore/uba), str)) {
/* 109 */         IBakedModel iBakedModel = v(eos/moe/dragoncore/uba);
/* 110 */         fj = fj.v(iBakedModel, eos/moe/dragoncore/uba.v());
/* 111 */         iItemStack.setMeta("modelKey", eos/moe/dragoncore/uba.h());
/*     */         break;
/*     */       } 
/*     */     } 
/* 115 */     iItemStack.setMeta("applyModelTime", Long.valueOf(System.currentTimeMillis()));
/*     */ 
/*     */     
/* 118 */     return fj;
/*     */   }
/*     */   
/*     */   public IBakedModel z(String str) {
/* 122 */     for (eos/moe/dragoncore/vga eos/moe/dragoncore/vga : this.q) {
/* 123 */       if (eos/moe/dragoncore/vga.h().equals(str)) {
/* 124 */         return v(eos/moe/dragoncore/vga);
/*     */       }
/*     */     } 
/* 127 */     for (eos/moe/dragoncore/uba eos/moe/dragoncore/uba : this.w) {
/* 128 */       if (eos/moe/dragoncore/uba.h().equals(str)) {
/* 129 */         return v(eos/moe/dragoncore/uba);
/*     */       }
/*     */     } 
/* 132 */     return null;
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public IBakedModel v(String str) {
/* 188 */     return this.d.get(str);
/*     */   }
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   
/*     */   public void z() {
/* 216 */     this.d.clear();
/* 217 */     this.z.clear();
/*     */     
/* 219 */     this.i.clear();
/* 220 */     v();
/*     */   }
/*     */   
/*     */   public void v() {
/* 224 */     this.g = System.currentTimeMillis();
/*     */   }
/*     */   
/*     */   public CopyOnWriteArrayList<eos/moe/dragoncore/uba> z() {
/* 228 */     return this.w;
/*     */   }
/*     */   
/*     */   public CopyOnWriteArrayList<eos/moe/dragoncore/vga> v() {
/* 232 */     return this.q;
/*     */   }
/*     */ 
/*     */   
/*     */   public static class eos/moe/dragoncore/uba
/*     */   {
/*     */     public boolean j;
/*     */     private String c;
/*     */     private Pattern r;
/*     */     private String f;
/*     */     private String s;
/*     */     private float m;
/*     */     private List<Float> l;
/*     */     private int t;
/*     */     private int d;
/*     */     private boolean z;
/*     */     private boolean i;
/*     */     private boolean w;
/*     */     private boolean q;
/*     */     private String g;
/*     */     
/*     */     public eos/moe/dragoncore/uba(String str, ConfigurationSection configurationSection) {
/* 254 */       this.c = configurationSection.getName();
/*     */       
/* 256 */       this.f = configurationSection.getString("match", "unknown").replace("&", "§");
/*     */       
/* 258 */       this.s = configurationSection.getString("path", "unknown");
/* 259 */       this.m = (float)configurationSection.getDouble("scale");
/* 260 */       this.d = configurationSection.getInt("type");
/* 261 */       this.l = configurationSection.getFloatList("offset");
/* 262 */       this.t = configurationSection.getInt("priority");
/* 263 */       this.z = configurationSection.getBoolean("bedrock");
/* 264 */       this.g = configurationSection.getString("gui");
/* 265 */       if (!this.z) {
/* 266 */         this.i = configurationSection.getBoolean("smd");
/*     */       }
/* 268 */       if (!this.i) {
/* 269 */         this.w = configurationSection.getBoolean("obj");
/*     */       }
/*     */       
/* 272 */       this.q = (this.z || this.i || this.w);
/* 273 */       this.j = configurationSection.getBoolean("debug");
/* 274 */       this.r = Pattern.compile(this.f);
/*     */     }
/*     */     
/*     */     public eos/moe/dragoncore/uba(String str1, String str2) {
/* 278 */       this.c = str1;
/* 279 */       this.s = str2;
/* 280 */       this.z = true;
/*     */     }
/*     */ 
/*     */     
/*     */     public String t() {
/* 285 */       return this.s;
/*     */     }
/*     */     
/*     */     public String h() {
/* 289 */       return this.c;
/*     */     }
/*     */     
/*     */     public float v() {
/* 293 */       return this.m;
/*     */     }
/*     */     
/*     */     public List<Float> v() {
/* 297 */       return this.l;
/*     */     }
/*     */ 
/*     */     
/*     */     public int z() {
/* 302 */       return this.t;
/*     */     }
/*     */     
/*     */     public Pattern v() {
/* 306 */       return this.r;
/*     */     }
/*     */     
/*     */     public String z() {
/* 310 */       return this.f;
/*     */     }
/*     */     
/*     */     public int v() {
/* 314 */       return this.d;
/*     */     }
/*     */ 
/*     */     
/*     */     public boolean y() {
/* 319 */       return this.j;
/*     */     }
/*     */     
/*     */     public boolean t() {
/* 323 */       return this.z;
/*     */     }
/*     */     
/*     */     public boolean h() {
/* 327 */       return this.i;
/*     */     }
/*     */     
/*     */     public boolean z() {
/* 331 */       return this.q;
/*     */     }
/*     */     
/*     */     public boolean v() {
/* 335 */       return this.w;
/*     */     }
/*     */     
/*     */     public String v() {
/* 339 */       return this.g;
/*     */     }
/*     */   }
/*     */   
/*     */   public static class eos/moe/dragoncore/vga {
/*     */     private String r;
/*     */     private String f;
/*     */     private List<String> s;
/*     */     private Pattern m;
/*     */     private String l;
/*     */     private boolean t;
/*     */     private float d;
/*     */     private List<Float> z;
/*     */     private int i;
/*     */     private boolean w;
/*     */     private int q;
/*     */     private String g;
/*     */     
/*     */     public eos/moe/dragoncore/vga(String str, ConfigurationSection configurationSection) throws ft {
/* 358 */       this.r = configurationSection.getName();
/*     */       
/* 360 */       this.f = configurationSection.getString("match", "unknown").replace("&", "§");
/*     */       
/* 362 */       this.l = configurationSection.getString("texture", "unknown.png");
/* 363 */       this.q = configurationSection.getInt("type");
/* 364 */       if (!this.l.startsWith("http")) {
/* 365 */         this.l = "icon/" + this.l;
/*     */       }
/* 367 */       this.w = configurationSection.getBoolean("held");
/* 368 */       this.t = configurationSection.getBoolean("center");
/* 369 */       this.d = (float)configurationSection.getDouble("scale");
/* 370 */       this.z = configurationSection.getFloatList("offset");
/* 371 */       this.i = configurationSection.getInt("priority");
/* 372 */       this.g = configurationSection.getString("gui");
/* 373 */       this.m = Pattern.compile(this.f);
/*     */     }
/*     */ 
/*     */ 
/*     */     
/*     */     public String t() {
/* 379 */       return this.l;
/*     */     }
/*     */     
/*     */     public String h() {
/* 383 */       return this.r;
/*     */     }
/*     */     
/*     */     public boolean z() {
/* 387 */       return this.t;
/*     */     }
/*     */     
/*     */     public float v() {
/* 391 */       return this.d;
/*     */     }
/*     */     
/*     */     public List<Float> z() {
/* 395 */       return this.z;
/*     */     }
/*     */     
/*     */     public int z() {
/* 399 */       return this.i;
/*     */     }
/*     */     
/*     */     public Pattern v() {
/* 403 */       return this.m;
/*     */     }
/*     */     
/*     */     public String z() {
/* 407 */       return this.f;
/*     */     }
/*     */     
/*     */     public boolean v() {
/* 411 */       return this.w;
/*     */     }
/*     */     
/*     */     public int v() {
/* 415 */       return this.q;
/*     */     }
/*     */     
/*     */     public List<String> v() {
/* 419 */       return this.s;
/*     */     }
/*     */     
/*     */     public String v() {
/* 423 */       return this.g;
/*     */     }
/*     */   }
/*     */ }


/* Location:              D:\fanbian\[D][龙之核心]DragonCore-2.6.0.3.jar!\eos\moe\dragoncore\ela.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */